package com.blacktea.creationalpatterns.abstractfactorypattern.factory;

import com.blacktea.creationalpatterns.abstractfactorypattern.service.AliAppletService;
import com.blacktea.creationalpatterns.abstractfactorypattern.service.WeChatAppletService;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * @description:
 * @author: black tea
 * @date: 2023/3/19 15:30
 */
@Service
public class ConcreteAppletFactory implements AbstractAppletFactory {

    @Override
    public Optional<AliAppletService> createAliApplet() {
        return Optional.of(new AliAppletService());
    }

    @Override
    public Optional<WeChatAppletService> createWxChatApplet() {
        return Optional.of(new WeChatAppletService());
    }
}
